home *** CD-ROM | disk | FTP | other *** search
- /*
- * $RCSfile: space.c,v $
- * $Revision: 1.1.1.1 $
- * $Date: 1996/05/04 21:55:11 $
- */
- /**********************************************************************
- * EXODUS Database Toolkit Software
- * Copyright (c) 1991 Computer Sciences Department, University of
- * Wisconsin -- Madison
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
- * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.
- * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * The EXODUS Project Group requests users of this software to return
- * any improvements or extensions that they make to:
- *
- * EXODUS Project Group
- * c/o David J. DeWitt and Michael J. Carey
- * Computer Sciences Department
- * University of Wisconsin -- Madison
- * Madison, WI 53706
- *
- * or exodus@cs.wisc.edu
- *
- * In addition, the EXODUS Project Group requests that users grant the
- * Computer Sciences Department rights to redistribute these changes.
- **********************************************************************/
-
- #include "sysdefs.h"
- #include "ess.h"
- #include "checking.h"
- #include "error.h"
- #include "io.h"
- #include "lock.h"
- #include "lock_globals.h"
-
-
- /*
- * define the lock compatibility table of locks held
- * by other transactions
- */
- UONE LM_Compat[NUM_LOCK_MODES][NUM_LOCK_MODES] = {
-
- /* NL IS IX SH SIX EX */
-
- /* NL */ { TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
- /* IS */ { TRUE, TRUE, TRUE, TRUE, TRUE, FALSE },
- /* IX */ { TRUE, TRUE, TRUE, FALSE, FALSE, FALSE },
- /* SH */ { TRUE, TRUE, FALSE, TRUE, FALSE, FALSE },
- /* SIX */ { TRUE, TRUE, FALSE, FALSE, FALSE, FALSE },
- /* EX */ { TRUE, FALSE, FALSE, FALSE, FALSE, FALSE } };
-
-
- /*
- * define the lock compatibility table of locks held
- * by the transaction requestion the lock
- */
- UONE LM_Compat_Upgrade[NUM_LOCK_MODES][NUM_LOCK_MODES] = {
-
- /* NL IS IX SH SIX EX */
-
- /* NL */ { TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
- /* IS */ { FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
- /* IX */ { FALSE, FALSE, TRUE, FALSE, TRUE, TRUE },
- /* SH */ { FALSE, FALSE, FALSE, TRUE, TRUE, TRUE },
- /* SIX */ { FALSE, FALSE, FALSE, FALSE, TRUE, TRUE },
- /* EX */ { FALSE, FALSE, FALSE, FALSE, FALSE, TRUE } };
-
-
- /*
- * define the lock conversion table
- */
- UONE LM_Convert[NUM_LOCK_MODES][NUM_LOCK_MODES] = {
-
- /* NL IS IX SH SIX EX */
-
- /* NL */ { NL, IS, IX, SH, SIX, EX },
- /* IS */ { IS, IS, IX, SH, SIX, EX },
- /* IX */ { IX, IX, IX, SIX, SIX, EX },
- /* SH */ { SH, SH, SIX, SH, SIX, EX },
- /* SIX */ { SIX, SIX, SIX, SIX, SIX, EX },
- /* EX */ { EX, EX, EX, EX, EX, EX } };
-
-
- /*
- * define the lock supremum table
- */
- UONE LM_Supremum[NUM_LOCK_MODES][NUM_LOCK_MODES] = {
-
- /* NL IS IX SH SIX EX */
-
- /* NL */ { NL, IS, IX, SH, SIX, EX },
- /* IS */ { IS, IS, IX, SH, SIX, EX },
- /* IX */ { IX, IX, IX, SIX, SIX, EX },
- /* SH */ { SH, SH, SIX, SH, SIX, EX },
- /* SIX */ { SIX, SIX, SIX, SIX, SIX, EX },
- /* EX */ { EX, EX, EX, EX, EX, EX } };
-
-
- /*
- * define a table for printing lock modes
- */
- char *LM_Character[NUM_LOCK_MODES] = {
-
- "NL", "IS", "IX", "SH", "SIX", "EX"
-
- };
-